package com.echo.code.spring.springbootdemo.aop;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.stereotype.Component;

/**
 * Description
 *
 * @author baiyp
 * @version 1.0.0
 * @date 2019/04/27
 */
@Component
@Aspect
@Slf4j
public class UserServiceAdvice {

  @Around("execution(* addUser(..))")
  public void around(ProceedingJoinPoint joinPoint) throws Throwable {
    log.info("before...");
    joinPoint.proceed();
    log.info("after...");
  }
}
